<a href="<?php echo $this->url(array('action' => 'index'), 'example_action'); ?>"><?php echo BaseZF::escape(_('Back to example index')); ?></a>

<style type="text/css">
  #autocompleter_results {
    border: 1px solid #999;
    background: #fafafa;
  }

  #autocompleter_results ul,  #autocompleter_results li{
    margin: 0;
    padding: 3px;
    list-style-image:none;
    list-style-position:outside;
    list-style-type:none;
  }

  .selected {
    background: #FF0000;
  }

</style>

<h2><?php echo BaseZF::escape(_('Ajax autocompleter')); ?></h2>
<form action="" method="post">
  <label for="autocompleter_value"><?php echo BaseZF::escape(_('Autocompleter:')); ?></label>
  <input type="text" size="30" name="autocompleter_value" id="autocompleter_value" />
  <div id="autocompleter_results"></div>
</form>

<script type="text/javascript">
new Ajax.Autocompleter (
      'autocompleter_value',            // ID of the source field
      'autocompleter_results',          // ID of the DOM element to update
      '<?php echo $this->url(); ?>',    // Remote script URI
      {method: 'post', paramName: 'autocompleter_value'}
);
</script>

<div class="clear"></div>

<ul>
    <li><a onclick="window.open(this.href); return false;" href="/doc/html/ajaxautocompleter_8php-source.html"><?php echo BaseZF::escape(_('See view source')); ?></a></li>
    <li><a onclick="window.open(this.href); return false;" href="/doc/html/classExampleController.html#ca325aca76d04363082684b8e1b3e660"><?php echo BaseZF::escape(_('See action source')); ?></a></li>
</ul>
